import xlrd
import pandas as pd
import numpy as np

filename = 'train'

data = xlrd.open_workbook('./' + filename + '.xlsx')
table = data.sheets()[0] 

FileIDs = table.col_values(0, start_rowx=1)
SpeciesIDs = table.col_values(1, start_rowx=1)
print(len(FileIDs), len(SpeciesIDs))

lst = list(zip(FileIDs, SpeciesIDs))
print(len(lst))

df = pd.DataFrame(lst, columns=['FileID','SpeciesID'])
print(df)

df.to_csv(filename + '.csv', index=None)
